#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  one.py
#       Author @  Huoty
#  Create date @  2016-05-31 19:33:24
#  Description @  
# *************************************************************

import cPickle as pickle

def test():
    print "hello"

d = {"one": 1, "two": 2, "three": 3}

with open("test.bat", "wb") as f:
    protocol = 0
    pickle.dump(d, f, protocol)
    pickle.dump(d, f, protocol)
    pickle.dump(d, f, protocol)
    pickle.dump(d, f, protocol)
    pickle.dump(test, f, protocol)

    import pandas as pd
    df = pd.DataFrame(data=[["huoty", 26, 66.2], ["修", 7, 20.1]])
    pickle.dump(df, f, protocol)
